using System;
using System.Collections.Generic;

internal sealed class AssignmentExpression : Expression
{
	public AssignmentExpression(string name, Expression value)
	{
		Name = name;
		Value = value;
	}
	
	public string Name {get; private set;}
	
	public Expression Value {get; private set;}
}

internal sealed class BinaryExpression : Expression
{
	public BinaryExpression(Expression lhs, Expression rhs, string op)
	{
		Operator = op;
		Left = lhs;
		Right = rhs;
	}
	
	public string Operator {get; private set;}
	
	public Expression Left {get; private set;}
	
	public Expression Right {get; private set;}
}

internal sealed class LiteralExpression : Expression
{
	public LiteralExpression(string value)
	{
		Value = double.Parse(value);
	}
	
	public double Value {get; private set;}
}

internal sealed class VariableExpression : Expression
{
	public VariableExpression(string name)
	{
		Name = name;
	}
	
	public string Name {get; private set;}
}
